@import 'tailwindcss';

@plugin 'tailwindcss-animate';

@custom-variant dark (&:is(.dark *));

@theme {
  --color-border: hsl(var(--border));
  --color-input: hsl(var(--input));
  --color-ring: hsl(var(--ring));
  --color-background: hsl(var(--background));
  --color-foreground: hsl(var(--foreground));

  --color-primary: hsl(var(--primary));
  --color-primary-foreground: hsl(var(--primary-foreground));

  --color-secondary: hsl(var(--secondary));
  --color-secondary-foreground: hsl(var(--secondary-foreground));

  --color-destructive: hsl(var(--destructive));
  --color-destructive-foreground: hsl(var(--destructive-foreground));

  --color-muted: hsl(var(--muted));
  --color-muted-foreground: hsl(var(--muted-foreground));

  --color-accent: hsl(var(--accent));
  --color-accent-foreground: hsl(var(--accent-foreground));

  --color-popover: hsl(var(--popover));
  --color-popover-foreground: hsl(var(--popover-foreground));

  --color-card: hsl(var(--card));
  --color-card-foreground: hsl(var(--card-foreground));

  --font-sans: Geist, sans-serif;
  --font-mono: Geist Mono, monospace;
  --font-tomorrow: Tomorrow, sans-serif;

  --radius-lg: var(--radius);
  --radius-md: calc(var(--radius) - 2px);
  --radius-sm: calc(var(--radius) - 4px);

  --animate-accordion-down: accordion-down 0.2s ease-out;
  --animate-accordion-up: accordion-up 0.2s ease-out;

  @keyframes accordion-down {
    from {
      height: 0;
    }
    to {
      height: var(--radix-accordion-content-height);
    }
  }
  @keyframes accordion-up {
    from {
      height: var(--radix-accordion-content-height);
    }
    to {
      height: 0;
    }
  }
}

@utility container {
  margin-inline: auto;
  padding-inline: 2rem;
  @media (width >= --theme(--breakpoint-sm)) {
    max-width: none;
  }
  @media (width >= 1400px) {
    max-width: 1400px;
  }
}

@layer base {
  @font-face {
    font-family: "Geist";

    src: url("../assets/fonts/geist/geist.ttf") format("truetype");
  }
  @font-face {
    font-family: "Geist Mono";
    font-display: swap;

    src: url("../assets/fonts/geist-mono/geist-mono.ttf") format("truetype");
  }

  @font-face {
    font-family: "Tomorrow";
    font-weight: 400;
    font-style: normal;

    src: url("../assets/fonts/tomorrow/tomorrow-regular.ttf") format("truetype");
  }
  @font-face {
    font-family: "Tomorrow";
    font-weight: 400;
    font-style: italic;

    src: url("../assets/fonts/tomorrow/tomorrow-italic.ttf") format("truetype");
  }
  @font-face {
    font-family: "Tomorrow";
    font-weight: 700;
    font-style: normal;

    src: url("../assets/fonts/tomorrow/tomorrow-bold.ttf") format("truetype");
  }
  @font-face {
    font-family: "Tomorrow";
    font-weight: 700;
    font-style: italic;

    src: url("../assets/fonts/tomorrow/tomorrow-bold-italic.ttf") format("truetype");
  }
}

@layer base {
  :root {
    --background: 77 0% 95%;
    --foreground: 77 0% 10%;

    --card: 77 0% 90%;
    --card-foreground: 77 0% 10%;

    --popover: 77 0% 95%;
    --popover-foreground: 77 95% 10%;

    --primary: 77 100% 31%;
    --primary-foreground: 0 0% 100%;

    --secondary: 77 10% 70%;
    --secondary-foreground: 0 0% 0%;

    --muted: 39 10% 85%;
    --muted-foreground: 77 0% 35%;

    --accent: 39 10% 80%;
    --accent-foreground: 77 0% 10%;

    --destructive: 0 50% 30%;
    --destructive-foreground: 77 0% 90%;

    --border: 77 20% 50%;
    --input: 77 20% 18%;
    --ring: 77 100% 31%;

    --radius: 0.5rem;
  }

  .dark {
    --background: 77 10% 10%;
    --foreground: 77 0% 90%;

    --card: 77 0% 10%;
    --card-foreground: 77 0% 90%;

    --popover: 77 10% 5%;
    --popover-foreground: 77 0% 90%;

    --primary: 77 100% 31%;
    --primary-foreground: 0 0% 100%;

    --secondary: 77 10% 10%;
    --secondary-foreground: 0 0% 100%;

    --muted: 39 10% 15%;
    --muted-foreground: 77 0% 60%;

    --accent: 39 10% 15%;
    --accent-foreground: 77 0% 90%;

    --destructive: 0 50% 30%;
    --destructive-foreground: 77 0% 90%;

    --border: 77 20% 18%;
    --input: 77 20% 18%;
    --ring: 77 100% 31%;

    --radius: 0.5rem;
  }
}

@layer base {
  * {
    @apply m-0 border-border p-0;
  }
  body {
    @apply overflow-hidden bg-background text-foreground;
  }
  .draglayer {
    @apply bg-background;
    -webkit-app-region: drag;
  }
  button {
    @apply cursor-pointer;
  }

  /* 自定义滚动条样式 */
  ::-webkit-scrollbar {
    @apply w-2;
  }

  ::-webkit-scrollbar-track {
    @apply bg-transparent;
  }

  ::-webkit-scrollbar-thumb {
    @apply rounded-full bg-muted-foreground/20 hover:bg-muted-foreground/30 transition-colors;
  }

  /* 在暗色模式下的滚动条样式 */
  .dark ::-webkit-scrollbar-thumb {
    @apply bg-muted-foreground/30 hover:bg-muted-foreground/40;
  }
}
